encore du ménage !
[minwii.git] / WiiMouse IR G.PIE
diff --git a/WiiMouse IR G.PIE b/WiiMouse IR G.PIE
deleted file mode 100755 (executable)
index dad484d..0000000
+++ /dev/null
@@ -1,157 +0,0 @@
-Wiimote1.led1 = true\r
-Wiimote2.led1 = true\r
-Wiimote2.led4 = true\r
-Wiimote3.led2 = true\r
-Wiimote4.led2 = true\r
-Wiimote4.led4 = true\r
-Wiimote5.led3 = true\r
-Wiimote6.led3 = true\r
-Wiimote6.led4 = true\r
-//Mouse Control Script using IR\r
-//by vkapadia with much assistance from inio\r
-//vkapadia@vkapadia.com\r
-//\r
-//Calibration:\r
-//To calibrate, run this program and put the Wiimote on a flat surface face-up.\r
-//Then read the values in the debug line (next to the run button).\r
-//Change these values until the debug line reads approx. all zeros.\r
-var.xtrim = -7\r
-var.ytrim = -17\r
-var.ztrim = -7\r
-//\r
-//Options:\r
-var.deadzone = 5 //distance in pixels that you have to move the wiimote in\r
-   //order for it to register movement. Creates a "dead zone" around the pointer\r
-   //to make it easier to click. Higher = smoother but less accurate.\r
-//fake cursor init\r
-cursor2.visible = true\r
-//more options to be added later\r
-\r
-//Controls:\r
-//Point Wiimote = Move Mouse\r
-//D-Pad = Arrow Keys\r
-//B-Button = Left Click\r
-//Home = Middle Click\r
-//A-Button = Right Click\r
-//Plus and Minus = Control Volume\r
-//One = Unmapped\r
-//Two = Unmapped\r
-//\r
-//If the pointer hits the edge of the screen, the Wiimote will rumble a bit.\r
-//\r
-//The LEDs attempt to emulate KITT's grill from Knight Rider\r
-\r
-//***Do not edit anything below this line unless you know what you are doing.***\r
-var.accx = wiimote.RawForceX + var.xtrim\r
-var.accy = wiimote.RawForceY + var.ytrim\r
-var.accz = wiimote.RawForceZ + var.ztrim\r
-\r
-if wiimote.dot1vis and wiimote.dot2vis then\r
-\r
-  if var.accy > -7 then\r
-    var.orientation = 0\r
-  elseif var.accy > -45 then\r
-    if var.accx < 0 then\r
-      var.orientation = 3\r
-    else\r
-      var.orientation = 1\r
-    endif\r
-  else\r
-    var.orientation = 2\r
-  endif\r
-\r
-  if var.leftpoint = 0 then\r
-    if var.orientation = 0 then\r
-      if wiimote.dot1x < wiimote.dot2x then\r
-        var.leftpoint = 1\r
-      else\r
-        var.leftpoint = 2\r
-      endif\r
-    endif\r
-    if var.orientation = 1 then\r
-      if wiimote.dot1y > wiimote.dot2y then\r
-        var.leftpoint = 1\r
-      else\r
-        var.leftpoint = 2\r
-      endif\r
-    endif\r
-    if var.orientation = 2 then\r
-      if wiimote.dot1x > wiimote.dot2x then\r
-        var.leftpoint = 1\r
-      else\r
-        var.leftpoint = 2\r
-      endif\r
-    endif\r
-    if var.orientation = 3 then\r
-      if wiimote.dot1y < wiimote.dot2y then\r
-        var.leftpoint = 1\r
-      else\r
-        var.leftpoint = 2\r
-      endif\r
-    endif\r
-  endif\r
-\r
-  if var.leftpoint = 1 then\r
-    var.fix1x = wiimote.dot1x\r
-    var.fix1y = wiimote.dot1y\r
-    var.fix2x = wiimote.dot2x\r
-    var.fix2y = wiimote.dot2y\r
-  else\r
-    var.fix1x = wiimote.dot2x\r
-    var.fix1y = wiimote.dot2y\r
-    var.fix2x = wiimote.dot1x\r
-    var.fix2y = wiimote.dot1y\r
-  endif\r
-\r
-  var.dx = var.fix2x - var.fix1x\r
-  var.dy = var.fix2y - var.fix1y\r
-  var.cx = (var.fix1x+var.fix2x)/1024.0 - 1\r
-  var.cy = (var.fix1y+var.fix2y)/1024.0 - .75\r
-\r
-  var.d = sqrt(var.dx*var.dx+var.dy*var.dy)\r
-\r
-  var.dx = var.dx / var.d\r
-  var.dy = var.dy / var.d\r
-\r
-  var.ox = -var.dy*var.cy-var.dx*var.cx;\r
-  var.oy = -var.dx*var.cy+var.dy*var.cx;\r
-\r
-  var.ax = (var.ox * screen.desktopwidth) + (screen.desktopwidth / 2)\r
-  var.ay = (-var.oy * screen.desktopwidth) + (screen.desktopheight / 2)\r
-\r
-  var.dx = var.ax - cursor2.posx\r
-  var.dy = var.ay - cursor2.posy\r
-\r
-  var.d = sqrt((var.dx*var.dx)+(var.dy*var.dy))\r
-\r
-  var.a = 180 / (200 + var.d * var.d * var.d * .001)\r
-\r
-  if var.d <= var.deadzone then var.a = 1\r
-\r
-  //debug = var.d + " " + var.a\r
-\r
-  var.finalx = cursor2.posx * var.a + var.ax * (1 - var.a)\r
-  var.finaly = cursor2.posy * var.a + var.ay * (1 - var.a)\r
-\r
-\r
-  cursor2.posx = smooth(var.finalx,3,5)\r
-  cursor2.posy = smooth(var.finaly,3,5)\r
-\r
-else\r
-\r
-  var.leftpoint = 0\r
-\r
-endif\r
-\r
-var.xpos = var.finalx\r
-var.ypos = var.finaly\r
-ppjoy1.analog0 = ensuremaprange(var.xpos,0,screen.desktopwidth,-1,1)\r
-ppjoy1.analog1 = ensuremaprange(var.ypos,0,screen.desktopheight,-1,1)\r
-\r
-if wiimote1.B == true\r
-  ppjoy1.digital0 = true\r
-else\r
-  ppjoy1.digital0 = false\r
-endif\r
-\r
-debug = var.xpos+ "  " + var.ypos\r